<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:f="http://java.sun.com/jsf/core"
                template="/template_content_admin.xhtml">

  <ui:define name="conteudo">
    <h2>#{msg['novo_evento']}</h2>
    <h:panelGroup id="messagePanel" layout="block">
            <h:messages errorClass="messagesErro" infoClass="messagesInfo" layout="table"/>
    </h:panelGroup>
    <h:form>
       <h:panelGrid columns="2" columnClasses="panelgridClass1, panelgridClass2">
            <f:facet name="header">
                <h:outputText value="Mó festa!!"/>
            </f:facet>
                    <h:outputText value="#{msg['nome']}"/>
                    <h:inputText styleClass="try" id="nome" value="#{evento.evento.nome}" title="Nome" required="true" requiredMessage="The nome field is required." />
                    <h:outputText value="#{msg['data']} (MM/dd/yyyy HH:mm:ss):"/>
                    <h:inputText styleClass="try" id="data" value="#{evento.evento.data}" title="Data" required="true" requiredMessage="The data field is required." >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputText value="#{msg['local']}:"/>
                    <h:inputText styleClass="try" id="local" value="#{evento.evento.local}" title="Local" required="true" requiredMessage="The local field is required." />
                </h:panelGrid>
                <h:panelGrid columns="2">
                    <h:commandButton id="add" styleClass="buttonK" value="#{msg['adicionar']}" action="#{evento.create}"/>
                    <h:commandButton id="list" styleClass="buttonK" value="#{msg['listar']}" action="#{evento.listarEventos}" immediate="true"/>
                </h:panelGrid>
    </h:form>
    </ui:define>

</ui:composition>
